function cover(){
    document.getElementById('coverico').style.cssText="visibility:hidden";
    document.getElementById('uncoverico').style.cssText="visibility:visible";
    document.getElementById('cover').style.cssText="position:fixed;background-image: url('thumbs/1cover.jpg');";
    document.getElementById('bgp').id="bgpactive";
    document.getElementById('bgpactive').style.cssText="visibility:visible";
    document.getElementById('bgpunder').id="abgpunder";
    document.getElementById('abgpunder').style.cssText="visibility:visible";
    
    //full screen
var docElm = document.documentElement;
if(docElm.requestFullscreen) {
    docElm.requestFullscreen();}
else if(docElm.mozRequestFullScreen) {
    docElm.mozRequestFullScreen();}
else if(docElm.webkitRequestFullScreen) {
    docElm.webkitRequestFullScreen();}
else if(elem.msRequestFullscreen) {
    elem.msRequestFullscreen();}}

function uncover(){
    document.getElementById('uncoverico').style.cssText="visibility:hidden";
    document.getElementById('coverico').style.cssText="visibility:visible";
    document.getElementById('cover').style.cssText="position:absolute;background-image: url('thumbs/1uncover.jpg');"
    document.getElementById('bgpactive').id="bgp";
    document.getElementById('bgp').style.cssText="visibility:hidden";
    document.getElementById('abgpunder').id="bgpunder";
    document.getElementById('bgpunder').style.cssText="visibility:hidden";
    //exit fullscreen
    if(document.exitFullscreen) {
    document.exitFullscreen();
} else if(document.mozCancelFullScreen) {
    document.mozCancelFullScreen();
} else if(document.webkitCancelFullScreen) {
    document.webkitCancelFullScreen();
} else if(document.msExitFullscreen) {
    document.msExitFullscreen();}
}

function con(){//background pictures switch(BGP)
    document.getElementById('con').style.cssText="visibility:hidden";
    document.getElementById('coff').style.cssText="visibility:visible";
    document.getElementById('bgpactive').style.cssText="visibility:hidden";
    document.getElementById('abgpunder').style.cssText="visibility:hidden";}
function coff(){
    document.getElementById('coff').style.cssText="visibility:hidden";
    document.getElementById('con').style.cssText="visibility:visible";
    document.getElementById('bgpactive').style.cssText="visibility:visiable";
    document.getElementById('abgpunder').style.cssText="visibility:visible";}

function key(){//key
key = event.keyCode;
if (key == 38) document.getElementById('btn-pause').click();
if (key == 32) document.getElementById('btn-pause').click();
if (key == 40) document.getElementById('btn-play').click();
if (key == 37) document.getElementById('btn-prev').click();
if (key == 39) document.getElementById('btn-next').click();
}
document.onkeydown=key;